package com.ggk911.pharmacy_system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 用户表
 * @author ggk-911
 * @version 1.0 2023/3/8 9:58
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
@TableName(value = "user")
public class User {
    //用户表主键，自增
    @TableId(value = "user_id", type = IdType.AUTO)
    @ApiModelProperty(value = "用户编号")
    private Integer userId;

    @ApiModelProperty(value = "用户名")
    private String userName;

    @ApiModelProperty(value = "用户密码")
    private String userPwd;

    @ApiModelProperty(value = "角色编号")
    private Integer roleId;

    //数据库中不存在，某用户其对应的角色
    @TableField(exist = false)
    private Role role;
}
